import * as React from "react";
import { Todo } from './Todo';
export class TodoList extends React.Component<{ todos, onTodoClick }, null>
{
    render()
    {
        return (
            <ul>
                {this.props.todos.map(todo =>
                    <Todo
                        key={todo.id}
                        {...todo}
                        onClick={() => this.props.onTodoClick(todo.id)}
                    />
                )}
            </ul>
        )
    }
}
